From 55b7c09016e4a043351b84e85ee6132578e882f4 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 4 Aug 2005 17:37:09 +0000 Subject: [PATCH] Fix my previous patch to the trap-frame creation code in Xen. I was clobbering an in-use register (AL): use CH instead. Signed-off-by: Keir Fraser --- xen/arch/x86/x86_32/entry.S | 4 ++-- xen/arch/x86/x86_64/entry.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S index 52a5449f74..99d5b1fbc2 100644 --- a/xen/arch/x86/x86_32/entry.S +++ b/xen/arch/x86/x86_32/entry.S @@ -335,8 +335,8 @@ FLT14: movl %eax,%gs:(%esi) movl VCPU_vcpu_info(%ebx),%eax pushl VCPUINFO_upcall_mask(%eax) testb $TBF_INTERRUPT,%cl - setnz %al # TBF_INTERRUPT -> set upcall mask - orb %al,VCPUINFO_upcall_mask(%eax) + setnz %ch # TBF_INTERRUPT -> set upcall mask + orb %ch,VCPUINFO_upcall_mask(%eax) popl %eax shll $16,%eax # Bits 16-23: saved_upcall_mask movw UREGS_cs+4(%esp),%ax # Bits 0-15: CS diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index d71e38ace4..a8a5574e2c 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -314,8 +314,8 @@ FLT4: movq %rax,16(%rsi) # RFLAGS movq VCPU_vcpu_info(%rbx),%rax pushq VCPUINFO_upcall_mask(%rax) testb $TBF_INTERRUPT,%cl - setnz %al # TBF_INTERRUPT -> set upcall mask - orb %al,VCPUINFO_upcall_mask(%rax) + setnz %ch # TBF_INTERRUPT -> set upcall mask + orb %ch,VCPUINFO_upcall_mask(%rax) popq %rax shlq $32,%rax # Bits 32-39: saved_upcall_mask movw UREGS_cs+8(%rsp),%ax # Bits 0-15: CS -- 2.30.2